<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" type="text/css" href="__CSS__/common.css?v=__VERSION__"/>
    <link rel="stylesheet" type="text/css" href="__CSS__/iconfont.css?v=__VERSION__"/>
    <link rel="stylesheet" type="text/css" href="__PLUGIN__/layui/css/layui.css?v=__VERSION__"/>
    <link rel="stylesheet" type="text/css" href="__CSS__/quesans_detail.css?v=__VERSION__"/>
    <script type="text/javascript" src="__JS__/jquery.min.js?v=__VERSION__"></script>
    <title>{$pageInfo['title']}</title>
    <meta name="keywords" content="{$pageInfo['keywords']}">
    <meta name="description" content="{$pageInfo['description']}">
</head>
<body>
<div id="main">

    {include file="common/nav" /}

    <div id="center" class="com">
        <div id="left-box">
            <input type="hidden" name="problem_id" value="{$problem.id}"/>
            <h1 class="questionName">{$problem.content}</h1>

            <div class="answer">
                <textarea class="answerWrite layui-hide" id="answerWrite"></textarea>
                <div class="tipCommit">
                    {if !empty($site.answer_tips)}<span class="manuscriptTip">{$site.answer_tips}</span>{/if}
                    <a class="btnSubmit aSubmit">发表回答</a>
                </div>
            </div>
            <h3 class="answerCountH">
                <span class="answerNum">{$problem.answerCount}个回答</span>
            </h3>
            {if !empty($problem['answerCount'])}
            <ul class="allAnswer answerList">
                {volist name="problem.answerList" id="answer"}
                <li>
                    <div class="answerUser">
                        <div class="avatar">
                            <img src="{$answer['user']['avatar']|image_processing=1}" >
                        </div>
                        <div class="answerName">{if !empty($answer['user']['nickname'])}{$answer['user']['nickname']}{else/}{$answer['user']['joinip']}{/if}</div>
                        <div class="answerPublishTime">{$answer['createtime']}</div>
                    </div>
                    <div class="answerText">{$answer['content']}</div>
                    <div class="answerTool" data-article_id="{$answer['id']}"><a href="javascript:void(0);" class="comment">
                        <img src="__IMAGES__/comment.png">
                        <span class="commentCount">{$answer.commentCount}</span>
                        <span class="click-comment">点击评论</span>
                    </a>
                    </div>
                    <div class="commentContainer">
                        <div class="commentWidget">
                            <div class="myComment">
                                <div class="commentAvatar">
                                    <img src="__IMAGES__/user.jfif" alt="">
                                </div>
                                <div class="commentArea">
                                    <textarea name="comment" placeholder="写下你的评论..." rows="8" class="commentText"></textarea>
                                    <a href="javascript:;" class="submitButton cSubmit" data-answer_id="{$answer['id']}">发表</a>
                                </div>
                            </div>
                            {if !empty($answer['commentCount'])}
                            <ul class="commentList">
                                {volist name="answer.commentList" id="comment"}
                                <li class="commentItem">
                                    <div class="commentAvatar">
                                        <img src="{$comment['user']['avatar']|image_processing=1}">
                                    </div>
                                    <div class="commentContent">
                                        <span class="uname">{if !empty($comment['user']['nickname'])}{$comment['user']['nickname']}{else/}{$comment['user']['joinip']}{/if}</span>
                                        <div class="contentText">{$comment.content}</div>
                                        <div class="tools">
                                            <span>{$comment.createtime}</span>
                                        </div>
                                    </div>
                                </li>
                                {/volist}
                            </ul>
                            {/if}
                        </div>
                    </div>
                </li>
                {/volist}
            </ul>
            {/if}
        </div>

        <div id="right-box">
            <div class="unbanner">
                <img src="{$site.quesans_right_img}">
            </div>

            <div class="searchQeustion">
                <input type="text" name="keywords" value="" class="inputText">
                <input type="button" value="搜索" class="button btnDefault" id="sSubmit">
                <input type="button" value="提问" class="button" id="pSubmit">
            </div>

            <div class="hotQuestion">
                <h4>
                    <span>热门推荐</span>
                    <a href="{:url('/quesans')}" data-node="recommand-feed" target="_blank">更多&gt;</a>
                </h4>
                <ul class="hotQuestionList hotProblemList">
                    {volist name="hotProblemList" id="hotProblem"}
                    <li>
                        <div class="questionTitle">
                            <h2>
                                <a href="{:url('/quesans/detail/'.$hotProblem['id'])}" target="_blank">{$hotProblem.content}</a>
                            </h2>
                        </div>
                        <div class="answerInfoUser">
                            <img src="{$hotProblem['user']['avatar']|image_processing=1}" class="avatar">
                            <span>{if !empty($hotProblem['user']['nickname'])}{$hotProblem['user']['nickname']}{else/}{$hotProblem['user']['joinip']}{/if}</span>
                            <span class="questionAnswerNum">{$hotProblem.answerCount}回答</span>
                        </div>
                        {if !empty($hotProblem['answerCount'])}
                        <div class="answerContent">
                            <div>
                                <a href="{:url('/quesans/detail/'.$hotProblem['id'])}">{$hotProblem.answer.content}</a>
                            </div>
                        </div>
                        {/if}
                    </li>
                    {/volist}
                </ul>
            </div>
        </div>
    </div>

    {include file="common/footer" /}

</div>

<script type="text/javascript" src="__JS__/common.js?v=__VERSION__"></script>
<script type="text/javascript" src="__PLUGIN__/layui/layui.js?v=__VERSION__"></script>
<script type="text/javascript" src="__JS__/quesans_detail.js?v=__VERSION__"></script>
</body>
</html>